package com.sxt.sys.controller;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;

import com.sxt.springcloud.sys.NoticeClientService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sxt.sys.common.DataGridView;
import com.sxt.sys.common.ResultObj;
import com.sxt.sys.common.WebUtils;
import com.sxt.sys.domain.Notice;
import com.sxt.sys.domain.User;

import com.sxt.sys.vo.NoticeVo;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 老雷
 * @since 2019-09-21
 */
@RestController
@RequestMapping("/notice")
public class NoticeController {
	
	@Autowired
	private NoticeClientService noticeService;
	
	
	/**
	 * 查询
	 */
	@RequestMapping("loadAllNotice")
	public DataGridView loadAllNotice(  NoticeVo noticeVo) {
		return this.noticeService.loadAllNotice(noticeVo);
	}
	
	
	/**
	 * 添加
	 */
	@RequestMapping("addNotice")
	public ResultObj addNotice( NoticeVo noticeVo) {
		return this.noticeService.addNotice(noticeVo);
	}
	/**
	 * 修改
	 */
	@RequestMapping("updateNotice")
	public ResultObj updateNotice( NoticeVo noticeVo) {
		return this.noticeService.updateNotice(noticeVo);
	}
	
	/**
	 * 删除
	 */
	@RequestMapping("deleteNotice")
	public ResultObj deleteNotice(@RequestParam("id") Integer id) {
		return this.noticeService.deleteNotice(id);
	}
	
	
	/**
	 * 批量删除
	 */
	@RequestMapping("batchDeleteNotice")
	public ResultObj batchDeleteNotice( NoticeVo noticeVo) {
		return this.noticeService.batchDeleteNotice(noticeVo);
	}
}

